//    	SheToDo - Shell To Do list.
//    	Copyright (C) 2011  Valentine Timoshik
//		Email: Finnale@gmail.com
//      This program is free software; you can redistribute it and/or modify
//      it under the terms of the GNU General Public License as published by
//      the Free Software Foundation; either version 2 of the License, or
//      (at your option) any later version.
//      
//      This program is distributed in the hope that it will be useful,
//      but WITHOUT ANY WARRANTY; without even the implied warranty of
//      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//      GNU General Public License for more details.
//      
//		You should have received a copy of the GNU General Public License
//    	along with this program.  If not, see <http://www.gnu.org/licenses/>.

#include <stdio.h>
#include <string.h>


void help()
{
	printf("SHEll TODO by Finale, 2011.\n This program serves as a little helper to keep all your thoughts in one shell-available place.\n");
	printf("--a ENTRY_TEXT - Adds an entry to your TODO list with ENTRY_TEXT as text. Remeber - you only have 256 symbols  - don't be too poetic ;)\n      Example: \"shetodo --a I have to wash the dishes today\"\n");
	printf("--l - Lists all your tasks arranging them in time of their appearance.\n");
	printf("--d ENTRY_NUMBER - Deletes entry with ENTRY_NUMBER.\n     You can always see what number some entry has with \"shetodo --l\"\n");
	printf("--help - Displays this tips.\n");
}

int main(int argc, char **argv)
{
if (argc==1) {
	printf("    Greetings!\n SheToDo by Finale. Use \"shetodo --help\" for usage. \n 2011 \n");
}
if ((argc==2) && (!strcmp(argv[1],"-l") || (!strcmp(argv[1],"--l"))))
{
	//listing func
	printf("DEBUG: going into -l or --l\n");
}
else if ((argc==2) && (!strcmp(argv[1],"-help") || (!strcmp(argv[1], "--help"))))
{
	help();
}
else if ((argc==2) && (!strcmp(argv[1],"-a") || (!strcmp(argv[1], "--a"))))
{
	//wrong "add" call"
	printf("Wrong parameter see \"contodo --help \" for usage.\n");
}
else if ((argc==3) && (!strcmp(argv[1],"-a") || (!strcmp(argv[1],"--a"))))
{
//add func
printf("DEBUG: going into add func\n");
}
else if ((argc==3) && (!strcmp(argv[1],"-d") || (!strcmp(argv[1],"--d"))))
{
	//going into delete func
	printf("DEBUG: going into delete\n");
}
else {
	if (argc!=1)
	{
	printf("Wrong argument! See \"contodo --help\" for usage.");
	}
}

printf("DEBUG: number of arguments %d\n", argc);
	return 0;
}
